import { useHistory } from "react-router-dom";
const useLogout = () => {
    let history = useHistory();
    const logout = () => {
        localStorage.removeItem('token')
        localStorage.removeItem('username')
        history.replace('/')
    }

    return {
        logout
    }
}

export default useLogout